import React from 'react';
import {withRouter} from 'react-router-dom'
class RouterClazzInnerComp extends React.Component {
    render() {
        console.log(this.props);
        return (
            <>
                class组件无法直接获取location,history,match,使用react-router-dom@v5提供的withRouter高阶组件解决
            </>
        )
    }
}

export default withRouter(RouterClazzInnerComp);